
#region Imports

using System;
using System.Collections.Generic;
using System.Text;
using System.Web.Services;

using Justa;

#endregion

namespace Justa.Web.Service
{
    /// <summary>
    /// 
    /// </summary>
    /// 
    public class GenericWebService : WebService
    {
        /// <summary>
        /// 
        /// </summary>
        /// 
        /// <returns></returns>
        /// 
        public virtual IApplicationContainer GetApplicationContainer()
        {
            return ApplicationContainerFactory.Create();
        }

        /// <summary>
        /// Get's an instance of a service from the default application context 
        /// based on the specified service name.
        /// </summary>
        /// 
        /// <param name="serviceName">The name os the service to get from the 
        /// default application context</param>
        /// <returns>Instance of a service based on the given service name.</returns>
        /// 
        public Object GetService(string serviceName)
        {
            return GetApplicationContainer().GetObject(serviceName);
        }
    }
}